home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
dblrou1r
/
mbox.frm
< prev
next >
Wrap
Text File
|
1998-11-04
|
5KB
|
155 lines
VERSION 5.00
Object = "{3BA9BED1-71BA-11D2-A2CD-702C4EC10700}#1.0#0"; "Gradients.ocx"
Begin VB.Form MBox
BorderStyle = 0 'None
Caption = "Form2"
ClientHeight = 1575
ClientLeft = 0
ClientTop = 0
ClientWidth = 4335
Icon = "MBox.frx":0000
LinkTopic = "Form2"
ScaleHeight = 105
ScaleMode = 3 'Pixel
ScaleWidth = 289
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin Gradients.Gradient Gradient1
Height = 1215
Left = 0
Top = 360
Width = 4335
_ExtentX = 7646
_ExtentY = 2143
Begin VB.CommandButton btnOut
DisabledPicture = "MBox.frx":0E42
DownPicture = "MBox.frx":21FC
Height = 495
Left = 1200
Picture = "MBox.frx":502E
Style = 1 'Graphical
TabIndex = 2
Top = 120
Width = 2055
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 0
Top = 0
End
Begin VB.CommandButton btnOK
DisabledPicture = "MBox.frx":7E60
DownPicture = "MBox.frx":9B3E
Height = 375
Left = 240
Picture = "MBox.frx":E4F0
Style = 1 'Graphical
TabIndex = 0
Top = 720
Width = 3855
End
End
Begin VB.Label lblTitle
Alignment = 2 'Center
BackColor = &H00400000&
Caption = "Thang"
BeginProperty Font
Name = "Comic Sans MS"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Left = 0
TabIndex = 1
Top = 0
Width = 4335
End
End
Attribute VB_Name = "MBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' The messagebox form.
' Makes use of my very own -=FREEWARE=- gradient control! Nifty huh?
Private bActive As Boolean
Private Sub btnOK_Click()
bActive = False
btnOK.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub btnOut_Click()
OutPutfrm.Show vbModal, Me
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
bActive = True
Gradient1.Red1 = 254
Gradient1.Green1 = 254
Gradient1.Blue1 = 1
Gradient1.Red2 = 254
Gradient1.Green2 = 1
Gradient1.Blue2 = 1
Me.Show
End Sub
Private Sub Form_Paint()
lblTitle.Refresh
Dim RedVel, GreenVel, BlueVel, RedVel1, GreenVel2, BlueVel2 As Integer
RedVel = 1
GreenVel = 3
BlueVel = 2
RedVel2 = 2
GreenVel2 = 1
BlueVel2 = 3
While (bActive)
DoEvents
Gradient1.Red1 = Gradient1.Red1 + RedVel
If Gradient1.Red1 >= 255 Then RedVel = -RedVel
If Gradient1.Red1 <= 0 Then RedVel = -RedVel
Gradient1.Green1 = Gradient1.Green1 + GreenVel
If Gradient1.Green1 >= 255 Then GreenVel = -GreenVel
If Gradient1.Green1 <= 0 Then GreenVel = -GreenVel
Gradient1.Blue1 = Gradient1.Blue1 + BlueVel
If Gradient1.Blue1 >= 255 Then BlueVel = -BlueVel
If Gradient1.Blue1 <= 0 Then BlueVel = -BlueVel
Gradient1.Red2 = Gradient1.Red2 + RedVel2
If Gradient1.Red2 >= 255 Then RedVel2 = -RedVel2
If Gradient1.Red2 <= 0 Then RedVel2 = -RedVel2
Gradient1.Green2 = Gradient1.Green2 + GreenVel2
If Gradient1.Green2 >= 255 Then GreenVel2 = -GreenVel2
If Gradient1.Green2 <= 0 Then GreenVel2 = -GreenVel2
Gradient1.Blue2 = Gradient1.Blue2 + BlueVel2
If Gradient1.Blue2 >= 255 Then BlueVel2 = -BlueVel2
If Gradient1.Blue2 <= 0 Then BlueVel2 = -BlueVel2
Gradient1.RefreshDisplay
Wend
End Sub
Private Sub Timer1_Timer()
Unload Me
End Sub